<template>
    <QilinSearch :searchConfig.sync="searchConfig" ref="searchConfigRef">
        <template v-slot:production="slotData">
            <el-input 
                v-model="searchConfig.submitData[slotData.data.item.dataName]"
                placeholder="请输入代表作"
            ></el-input>
        </template>
    </QilinSearch>
</template>

<script>
export default {
    data(){
        return {
            searchConfig:{
                elFormConfig:{
                    labelPOsition:"right",
                    labelSuffix:"：",
                    size:"small"
                },
                itemConfig:[
                    {
                        labelName:"姓名",
                        dataName:"name",
                        type:"input",
                        inputType:"text"
                    },
                    {
                        labelName:"身份",
                        dataName:"identity",
                        type:"select",
                        dataListName:"identityList",
                        multiple:true,
                        filterable:false,
                        collapseTags:true
                    },
                    {
                        labelName:"出生日期",
                        dataName:"birthday",
                        type:"date",
                        dateType:"date",
                        format:"yyyy-MM-dd",
                        valueFormat:"yyyy-MM-dd",
                        width:160
                    },
                    {
                        labelName:"代表作",
                        dataName:"production",
                        type:"slot",
                        slotName:"production"
                    }
                ],
                moreConfig:{
                    isShowMore:true
                },
                moreItemConfig:[
                    {
                        labelName:"工作区间",
                        dataName:"workInterval",
                        type:"date",
                        dateType:"daterange",
                        format:"yyyy-MM-dd",
                        valueFormat:"yyyy-MM-dd"
                    },
                    {
                        labelName:"参与项目",
                        dataName:"projectName",
                        type:"select",
                        dataListName:"projectNameList"
                    },
                    {
                        labelName:"项目所属",
                        dataName:"projectOwn",
                        type:"cascader",
                        dataListName:"projectOwnList",
                        cascaderProps:{
                            label:"name",
                            value:"id",
                            children:"children"
                        }
                    }
                ],
                selectLists:{
                    identityList:[
                        {
                            label:"学生",
                            value:0
                        },
                        {
                            label:"程序员",
                            value:1
                        },
                        {
                            label:"作者",
                            value:2
                        },
                        {
                            label:"打工人",
                            value:3
                        }
                    ],
                    projectNameList:[
                        {
                            label:"看守所、戒毒所、拘留所等项目",
                            value:0
                        },
                        {
                            label:"SDP零信任项目",
                            value:1
                        },
                        {
                            label:"动态应用安全防护系统BSG",
                            value:2
                        },
                        {
                            label:"云上贵州项目",
                            value:3
                        },
                        {
                            label:"红花街道h5项目",
                            value:4
                        },
                        {
                            label:"温州市党政机关信息化项目",
                            value:5
                        },
                        {
                            label:"U创办公管理系统",
                            value:6
                        },
                        {
                            label:"U创办公小程序项目",
                            value:7
                        }
                    ],
                    projectOwnList:[
                        {
                            name:"南京冠霆智能科技有限公司",
                            id:1,
                            children:[
                                {
                                    name:"看守所项目",
                                    id:11
                                },
                                {
                                    name:"拘留所项目",
                                    id:12
                                },
                                {
                                    name:"戒毒所项目",
                                    id:13
                                },
                                {
                                    name:"安康医院项目",
                                    id:14
                                }
                            ]
                        },
                        {
                            name:"亚信安全有限公司",
                            id:2,
                            children:[
                                {
                                    name:"亚信智网有限公司",
                                    id:21,
                                    children:[
                                        {
                                            name:"SDP零信任项目",
                                            id:211
                                        },
                                        {
                                            name:"动态应用安全防护系统BSG",
                                            id:212
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            name:"苏软科技（南京）有限公司",
                            id:3,
                            children:[
                                {
                                    name:"云上贵州项目",
                                    id:31
                                },
                                {
                                    name:"红花街道h5项目",
                                    id:32
                                },
                                {
                                    name:"温州市党政机关信息化项目",
                                    id:33
                                }
                            ]
                        },
                        {
                            name:"南京联创智慧城市科技有限公司",
                            id:4,
                            children:[
                                {
                                    name:"U创办公管理系统",
                                    id:41
                                },
                                {
                                    name:"U创办公小程序",
                                    id:42
                                }
                            ]
                        }
                    ]
                },
                buttonConfig:[
                    {
                        btnName:"查询",
                        btnType:"primary",
                        btnSize:"small",
                        formRefName:()=>{
                            return this.$refs["searchConfigRef"];
                        },
                        btnClick:(formRef)=>{
                            console.log(formRef);
                            console.log(this.searchConfig.submitData);
                        }
                    },
                    {
                        btnName:"重置",
                        btnType:"default",
                        btnSize:"small",
                        formRefName:()=>{
                            return this.$refs["searchConfigRef"];
                        },
                        btnClick:(formRef)=>{
                            console.log(formRef);
                        }
                    },
                ],
                submitData:{
                    name:"",
                    identity:"",
                    birthday:"",
                    production:"",
                    workInterval:"",
                    projectName:"",
                    projectOwn:""
                }
            }
        }
    },
    methods:{

    },
    mounted(){

    }
}
</script>

<style lang="scss" scoped>

</style>
